GBML manual / Constants

BGLOOK_WAVE

A ripple: the picture sways left and right as you go down the screen, like a reflection in water.

Syntax

BGLOOK_WAVE: constant

<!-- GENERATED by tools/gbabel_looks.py from its LOOKS registry. Never edit this page: change the registry and re-run it. -->

Description

Names the ripple, for background_look. The background is moved sideways by a different amount on every row of the screen, in a smooth wave 32 rows long, so the picture ripples like a reflection in a pond.

strength is how far it sways, each way: 1 is one pixel, 2 is two and 3 is four.

A real capture, four pictures of the same sea scene with seaweed and slanting shafts of light - straight, then with BGLOOK_WAVE at strength 1, strength 2 and strength 3 (every row slid sideways by its own amount, so the seaweed and the light shafts wobble more each time) - the ripples held in the same place each timeA real capture, four pictures of the same sea scene with seaweed and slanting shafts of light - straight, then with BGLOOK_WAVE at strength 1, strength 2 and strength 3 (every row slid sideways by its own amount, so the seaweed and the light shafts wobble more each time) - the ripples held in the same place each time
A real capture, four pictures of the same sea scene with seaweed and slanting shafts of light - straight, then with BGLOOK_WAVE at strength 1, strength 2 and strength 3 (every row slid sideways by its own amount, so the seaweed and the light shafts wobble more each time) - the ripples held in the same place each time

The same picture four times: straight, then strength 1, 2 and 3 from left to right, each one standing still where the pattern had got to. Real pictures from a Game Boy Advance ROM.

speed is how many rows the pattern travels down the screen every frame. 0 holds it still, a negative number sends it up, 0.25 is slow and 1 is quick. The pattern belongs to the rows of the screen, not to the picture.

A real capture, 16 frames played in a loop - the whole sea scene ripples, the waves running down the screen and bending the seaweed and the light shafts as they passA real capture, 16 frames played in a loop - the whole sea scene ripples, the waves running down the screen and bending the seaweed and the light shafts as they pass
A real capture, 16 frames played in a loop - the whole sea scene ripples, the waves running down the screen and bending the seaweed and the light shafts as they pass

The pattern moving, sped up: sixteen real pictures four frames apart, played 70 milliseconds each, at strength 3. It is a whole turn of the pattern, so the loop has no seam. This picture is an animated PNG; a viewer that cannot animate shows its first frame.

Example

backdrop = background_create(0, 0, ts_doc_dungeon);
background_look(backdrop, BGLOOK_WAVE, 2, 0.5);

A background that ripples like water. Turn it off with background_look(my_background, BGLOOK_NONE, 0, 0) before you destroy the background.

See also: background_lookBGLOOK_NONEBGLOOK_SWAY